<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<lv-form [formGroup]="formGroup" class="formGroup">
    <lv-form-item>
        <lv-form-label lvRequired>{{ 'common_files_label' | i18n }}</lv-form-label>
        <lv-form-control>
            <lv-upload lvAccept=".zip" lvShowUpload="false" [lvFilters]='filters'
                (lvFilesChange)="crlFilesChange($event)" (lvChange)="filesChange($event)"></lv-upload>
            <span class="aui-text-help-sm">
                {{'system_import_backup_file_label' | i18n}}
            </span>
        </lv-form-control>
    </lv-form-item>
    <ng-container *ngIf="!isCyberengine">
        <lv-form-item>
            <lv-form-label lvRequired>{{'system_trap_data_encryption_password_label' | i18n}}
            </lv-form-label>
            <lv-form-control [lvErrorTip]="pwdErrorTip">
                <aui-inupt-with-eye formControlName="password" [lvPasteAllowed]="false"
                    placeholder="{{'system_trap_data_encryption_password_tip_label' | i18n}}"></aui-inupt-with-eye>
            </lv-form-control>
        </lv-form-item>
    </ng-container>
    <ng-container *ngIf="isSupportSignVerify">
        <lv-form-item>
            <lv-form-label>
                {{'system_verify_signature_label' | i18n}}
            </lv-form-label>
            <lv-form-control>
                <lv-switch formControlName="needSignVerify"></lv-switch>
            </lv-form-control>
        </lv-form-item>
    </ng-container>
    <ng-container *ngIf="!formGroup.value.needSignVerify">
        <lv-form-item>
            <lv-form-label>
                {{passwordLabel}}
                <i lv-icon="aui-icon-help" [lv-tooltip]="passwordTipLabel"
                    lvTooltipTheme="light" lvTooltipPosition="right" class="configform-constraint" lvColorState='true'></i>
            </lv-form-label>
            <lv-form-control [lvErrorTip]="superDmPwdErrorTip">
                <aui-inupt-with-eye formControlName="superDmPwd" [lvPasteAllowed]="false"></aui-inupt-with-eye>
            </lv-form-control>
        </lv-form-item>
    </ng-container>
</lv-form>